#include <iostream>
#include <vector>
#include "exercise.h"
using namespace std; 

void test()
{
	size_t sz = 0;
	vector<int> v;
	sz = v.capacity();
	for (int i = 0; i < 100; i++)
	{
		v.push_back(i);
		if (sz != v.capacity())
		{
			sz = v.capacity();
			cout << "change: " << sz << '\n';
		}
	}
}
void review()
{
	vector<int> v{ 1, 2, 3, 4 };
	vector<int>v1(v);
	for (auto a : v)
	{
		cout << a << ' ';
	}cout << endl;
	for (auto a : v1)
	{
		cout << a << ' ';
	}
	for (auto i = v.begin(); i != v.end(); i++)
	{
		cout << *i << " ";
	}
	cout << "size=" << v.size() << " capacity=" << v.capacity() << endl << endl;

	test();

}

void review2()
{
	std::vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	for (int i : v) {
		std::cout << i << " ";
	}
	cout << endl;
	v.pop_back();
	for (int i : v) {
		std::cout << i << " ";
	}
}

int main()
{
	exercise::vector<int> v;
	cout << v.size() << " " << v.capacity() << endl;
}